package com.woniuxy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.mapper.ShippingCompanyMapper;
import com.woniuxy.pojo.ShippingCompany;
import com.woniuxy.service.ShippingCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
* @author 29331
* @description 针对表【t_shipping_company】的数据库操作Service实现
* @createDate 2025-06-06 16:32:47
*/
@Service
public class ShippingCompanyServiceImpl extends ServiceImpl<ShippingCompanyMapper, ShippingCompany>
    implements ShippingCompanyService {

    @Autowired
    private ShippingCompanyMapper shippingCompanyMapper;

    @Override
    public List<ShippingCompany> getAllExpressCompanies() {
        List<ShippingCompany> list = shippingCompanyMapper.selectList(null);
        List<String> names = new ArrayList<>();
        for (ShippingCompany name : list){
            names.add(name.getName());
        }

        return list;
    }
}




